using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace Store
{
    public partial class frMain : DevComponents.DotNetBar.Office2007RibbonForm
    {
        public static frDetailImport NhapKho;
        public static frImport NhapHang;
        public static frExport XuatHang;
        public static frOrder DatHang; 
        public static frProducts SanPham;
        public static frStore KhoHang;
        public static frReport_Store Report_Store;
        public static frReport_Price Report_Price;
        public static frReport_Category Report_Category;
        public frMain()
        {
            InitializeComponent();
        }

        private void buttonItem14_Click(object sender, EventArgs e)
        {
            if (DatHang == null || DatHang.IsDisposed)
            {
                DatHang = new frOrder();
                DatHang.MdiParent = frMain.ActiveForm;
                DatHang.Show();
            }
            else
                DatHang.Activate();
        }

        private void buttonItem15_Click(object sender, EventArgs e)
        {
            if (XuatHang == null || XuatHang.IsDisposed)
            {
                XuatHang = new frExport();
                XuatHang.MdiParent = frMain.ActiveForm;
                XuatHang.Show();
            }
            else
                XuatHang.Activate();
        }

        private void buttonItem16_Click(object sender, EventArgs e)
        {
            if (NhapHang == null || NhapHang.IsDisposed)
            {
                NhapHang = new frImport();
                NhapHang.MdiParent = frMain.ActiveForm;
                NhapHang.Show();
            }
            else
                NhapHang.Activate();
        }

        private void buttonItem17_Click(object sender, EventArgs e)
        {
            if (NhapKho == null || NhapKho.IsDisposed)
            {
                NhapKho = new frDetailImport();
                NhapKho.MdiParent = frMain.ActiveForm;
                NhapKho.Show();
            }
            else
                NhapKho.Activate();
        }

        private void buttonItem19_Click(object sender, EventArgs e)
        {
            if (SanPham == null || NhapKho.IsDisposed)
            {
                SanPham = new frProducts();
                SanPham.MdiParent = frMain.ActiveForm;
                SanPham.Show();
            }
            else
                SanPham.Activate();
        }

        private void buttonItem18_Click(object sender, EventArgs e)
        {
            if (KhoHang == null || KhoHang.IsDisposed)
            {
                KhoHang = new frStore();
                KhoHang.MdiParent = frMain.ActiveForm;
                KhoHang.Show();
            }
            else
                KhoHang.Activate();
        }

        private void buttonItem1_Click(object sender, EventArgs e)
        {
            if (Report_Store == null || Report_Store.IsDisposed)
            {
                Report_Store = new frReport_Store();
                Report_Store.MdiParent = frMain.ActiveForm;
                Report_Store.Show();
            }
            else
                Report_Store.Activate();
        }

        private void buttonItem20_Click(object sender, EventArgs e)
        {
            if (Report_Category == null || Report_Category.IsDisposed)
            {
                Report_Category = new frReport_Category();
                Report_Category.MdiParent = frMain.ActiveForm;
                Report_Category.Show();
            }
            else
                Report_Category.Activate();
        }

        private void buttonItem21_Click(object sender, EventArgs e)
        {
            if (Report_Price == null || Report_Price.IsDisposed)
            {
                Report_Price = new frReport_Price();
                Report_Price.MdiParent = frMain.ActiveForm;
                Report_Price.Show();
            }
            else
                Report_Price.Activate();
        }
    }
}